package cn.uin.domain.family.model.valobj;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @ClassName RegisterTypeEnum
 * @Description:家庭加入状态类型枚举
 * @Author: Administrator
 * @CreateDate: 2025/10/22 9:46
 * @Version: 1.0
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum FamilyAddStatusTypeEnum {

	INVITED(1, "待接受"),
	ACCEPT(2, "已接受"),
	EXPIRED(3, "已过期");

	private Integer code;
	private String info;

	public static FamilyAddStatusTypeEnum get(Integer code) {
		switch (code) {
			case 1:
				return INVITED;
			case 2:
				return ACCEPT;
			case 3:
				return EXPIRED;
			default:
				throw new RuntimeException("err code!");
		}
	}

}
